//
//  DQFriendTrendsViewController.m
//  DQBaisibudejie
//
//  Created by 杜倩 on 16/8/29.
//  Copyright © 2016年 杜倩. All rights reserved.
//

#import "DQFriendTrendsViewController.h"
#import "UIBarButtonItem+buttonItem.h"
#import "DQLoginViewController.h"
#import "DQRegistViewController.h"
#import "DQCommendController.h"
@interface DQFriendTrendsViewController ()

@end

@implementation DQFriendTrendsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addItem];
}
-(void)addItem{
//设置
    UIBarButtonItem *itemL=[UIBarButtonItem barButtonItemWith:[UIButton buttonWithType:UIButtonTypeCustom] addTarget:self action:@selector(leftClick) andImage:@"friendsRecommentIcon" andhightLighted:@"friendsRecommentIcon-click"];
    self.navigationItem.title=@"关注";
    self.navigationItem.leftBarButtonItem=itemL;
}
#pragma mark 左边按钮的单击事件-->单击跳转到推荐关注界面
-(void)leftClick{
   // NSLog(@"%s",__func__);
    
    DQCommendController *commend= [[DQCommendController alloc] init];
    commend.hidesBottomBarWhenPushed=YES;//隐藏tabbar标签栏--一定要在跳转之前隐藏,隐藏下一个界面的标签栏,不是当前的
    
    //进入推荐关注控制器
    [self.navigationController pushViewController:commend animated:YES];
    
    
    
}


#pragma mark 登录按钮方法
- (IBAction)login:(id)sender {
    //创建
    DQLoginViewController *login=[[DQLoginViewController alloc] init];
    [self presentViewController:login animated:YES completion:nil];//模态
    
    
    
}

#pragma Mark 注册按钮方法
- (IBAction)regist:(id)sender {
    //创建
    DQRegistViewController *regist=[[DQRegistViewController alloc] init];
    [self presentViewController:regist animated:YES completion:nil];//模态
    
    
}


@end
